Repository navigation
fix(webapp): preserve active side menu state on detail pages - #5115
arnavbhure wants to merge 1 commit into
Conversation
|
|
Hi @arnavbhure, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
| activePathPrefix={[ | ||
| `${environmentPath}/tasks`, | ||
| `${environmentPath}/agents`, | ||
| `${environmentPath}/schedules`, | ||
| ]} |
There was a problem hiding this comment.
Closes #5088
✅ Checklist
Testing
Ran the webapp unit tests and static checks after the final edit:
pnpm --filter webapp exec vitest run test/sideMenuSections.test.ts test/sideMenuPathActive.test.ts— 2 test files, 13 tests passedpnpm run typecheck --filter webapp— passed (20/20 packages/tasks)pnpm run lint— 0 warnings, 0 errors across 5,767 filespnpm run knip— passed with no unused exports/filesAdded unit test coverage in
apps/webapp/test/sideMenuPathActive.test.tsandapps/webapp/test/sideMenuSections.test.tsverifying/boundary isolation (e.g./concurrencyvs/concurrency-limits),Tasksmatching/tasks/...,/agents/..., and/schedules/...without matching sibling environment routes,buildSideMenuSectionsdefaulting tomatchPrefix: true, anddashboardsopting out withmatchPrefix: false.Changelog
Keep side menu items highlighted when navigating to detail pages and sub-routes within their section:
isSideMenuPathActivehelper inSideMenuItem.tsxsupportingmatchPrefixand a newactivePathPrefixprop while preservingisActiveoverrides andyieldActiveToFavoritebehavior for Favorites.buildSideMenuSections(andCustomizableSideMenuSection) tomatchPrefix: true, withDashboardsopting out (matchPrefix: false) so child dashboard items own their highlight.matchPrefixonRuns,Sessions,Webhooks, andPrivate Connections(organization settings), and addedactivePathPrefix(/tasks,/agents,/schedules) onTasks..server-changes/fix-side-menu-active-state.mdand targeted unit tests.